package com.dxtan90.bean;

/**
 * @author: shijunhao
 * @date: 2021/12/1 18:04
 * @description: 坐标位置
 */
public class Position {
    //用于程序定位
    //用于屏幕X轴坐标
    private Integer x = -1;
    //用于屏幕Y轴坐标
    private Integer y = -1;

    //点击事件一律采用中心点，用于用户定位
    //用于图像中心X轴坐标
    private Integer centerX = -1;
    //用于图像中心Y轴坐标
    private Integer centerY = -1;
    //用于判断坐标是否有效
    private Boolean isUseful = false;

    //键盘点击事件，或者鼠标上下滚轮
    private Integer value = -1;

    public Position() {
    }

    public Position(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public Position(int x, int y, int centerX, int centerY) {
        this.x = x;
        this.y = y;
        this.centerX = centerX;
        this.centerY = centerY;
        this.isUseful = true;
    }

    public Position(Integer value) {
        this.value = value;
        this.isUseful = true;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public Integer getX() {
        return x;
    }

    public void setX(Integer x) {
        this.x = x;
    }

    public Integer getY() {
        return y;
    }

    public void setY(Integer y) {
        this.y = y;
    }

    public Integer getCenterX() {
        return centerX;
    }

    public void setCenterX(Integer centerX) {
        this.centerX = centerX;
    }

    public Integer getCenterY() {
        return centerY;
    }

    public void setCenterY(Integer centerY) {
        this.centerY = centerY;
    }

    public Boolean getUseful() {
        return isUseful;
    }

    public void setUseful(Boolean useful) {
        isUseful = useful;
    }

    @Override
    public String toString() {
        return "Position(" + x + ',' + y + "),Center("+ centerX + ',' + centerY + "),Value("+value+")";
    }
}
